#include "utils.h"

QString Uchar2HexQstring(const u_char *md, size_t nLen)
{
    static const char hex_chars[] = "0123456789ABCDEF";
    QString str;
    for (size_t i = 0; i < nLen; i++)
    {
        const u_char data=md[i];
        str += hex_chars[(data >> 4) & 0x0f];
        str += hex_chars[data & 0x0f];
        str += " ";
    }
    return str.toUpper();

}
